package org.itboys.core.service.mysql.web;

import org.itboys.core.entity.mysql.SundayScore;
import org.itboys.mysql.service.BaseMySqlService;
import org.itboys.param.PageResult;
import org.itboys.param.ParamUtil;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * Auther: 罗尧坤
 * Date: 2018/8/21
 * Description:
 */
@Service
public class SundayScoreService extends BaseMySqlService<SundayScore> {
    /**
     * 获取用户积分
     * @param request
     * @param memberId
     * @return
     */
    public PageResult selectScore(HttpServletRequest request, Long memberId){
        Map<String, Object> param = ParamUtil.packageMysqlPageParam(request);
        param.put("memberId",memberId);
        return new PageResult<>(super.select(param), super.count(param));
    }
}
